package com.ruoyi.function.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.function.mapper.InterchangeMileageStatMapper;
import com.ruoyi.function.domain.InterchangeMileageStat;
import com.ruoyi.function.service.IInterchangeMileageStatService;

/**
 * 互通里程实测数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class InterchangeMileageStatServiceImpl implements IInterchangeMileageStatService 
{
    @Autowired
    private InterchangeMileageStatMapper interchangeMileageStatMapper;

    /**
     * 查询互通里程实测数据
     * 
     * @param id 互通里程实测数据主键
     * @return 互通里程实测数据
     */
    @Override
    public InterchangeMileageStat selectInterchangeMileageStatById(Long id)
    {
        return interchangeMileageStatMapper.selectInterchangeMileageStatById(id);
    }

    /**
     * 查询互通里程实测数据列表
     * 
     * @param interchangeMileageStat 互通里程实测数据
     * @return 互通里程实测数据
     */
    @Override
    public List<InterchangeMileageStat> selectInterchangeMileageStatList(InterchangeMileageStat interchangeMileageStat)
    {
        return interchangeMileageStatMapper.selectInterchangeMileageStatList(interchangeMileageStat);
    }

    /**
     * 新增互通里程实测数据
     * 
     * @param interchangeMileageStat 互通里程实测数据
     * @return 结果
     */
    @Override
    public int insertInterchangeMileageStat(InterchangeMileageStat interchangeMileageStat)
    {
        return interchangeMileageStatMapper.insertInterchangeMileageStat(interchangeMileageStat);
    }

    /**
     * 修改互通里程实测数据
     * 
     * @param interchangeMileageStat 互通里程实测数据
     * @return 结果
     */
    @Override
    public int updateInterchangeMileageStat(InterchangeMileageStat interchangeMileageStat)
    {
        return interchangeMileageStatMapper.updateInterchangeMileageStat(interchangeMileageStat);
    }

    /**
     * 批量删除互通里程实测数据
     * 
     * @param ids 需要删除的互通里程实测数据主键
     * @return 结果
     */
    @Override
    public int deleteInterchangeMileageStatByIds(Long[] ids)
    {
        return interchangeMileageStatMapper.deleteInterchangeMileageStatByIds(ids);
    }

    /**
     * 删除互通里程实测数据信息
     * 
     * @param id 互通里程实测数据主键
     * @return 结果
     */
    @Override
    public int deleteInterchangeMileageStatById(Long id)
    {
        return interchangeMileageStatMapper.deleteInterchangeMileageStatById(id);
    }

    @Override
    public boolean hasChildById(Long id)
    {
        return interchangeMileageStatMapper.hasChildById(id) > 0;
    }

    @Override
    public InterchangeMileageStat selectInterchangeMileageStatByIdAndParentId(InterchangeMileageStat interchangeMileageStat)
    {
        return interchangeMileageStatMapper.selectInterchangeMileageStatByIdAndParentId(interchangeMileageStat);
    }
}
